Determining geographic areas of interest for a query

ABSTRACT

Methods, systems, and apparatus for selecting geographic areas of interest for a query. A method includes for each query stored in search log data, determining an origin location for each occurrence of the query, determining a content location for each occurrence of the query, for each of a plurality of catchment areas, determining catchment area matches for the query based on the origin location of each occurrence of the query and the content location of the occurrence of the query, determining, for each catchment area, a catchment area score that is indicative of an interest level for the catchment area for a query, the determination based on a number of catchment area matches for the catchment area for the query and selecting, for the query and based on the catchment area scores for the catchment areas, one of the catchment areas as a selected catchment area for the query.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of, and claims priorityto, U.S. patent application Ser. No. 14/698,443, entitled “DeterminingGeographic Areas Of Interest For A Query,” filed on Apr. 28, 2015, whichis a continuation application of, and claims priority to, U.S. patentapplication Ser. No. 14/210,935, now U.S. Pat. No. 9,043,304, entitled“Determining Geographic Areas Of Interest For A Query,” filed on Mar.14, 2014, which is a continuation application of, and claims priorityto, U.S. patent application Ser. No. 13/644,194, now U.S. Pat. No.8,676,777, entitled “Determining Geographic Areas Of Interest For AQuery,” filed on Oct. 3, 2012. The disclosure of the foregoingapplications are incorporated herein by reference in their entirety forall purposes.

BACKGROUND

This specification relates to data processing and indexing.

The Internet provides access to a wide variety of resources such asvideo or audio files, web pages for particular subjects, book articles,or news articles. A search system can identify resources in response toa search query. The search system ranks the resources based on theirrelevance to the search query and on measures of quality of theresources and provides search results that link to the identifiedresources. The search results are typically ordered for viewingaccording to the ranking.

SUMMARY

The subject matter of this disclosure determines catchment areas forqueries.

In general, one innovative aspect of the subject matter described inthis specification can be embodied in methods that include the actionsof for each of a plurality of queries stored in search log data, each ofthe queries comprising one or more terms, and each of the queries havingone or more occurrences of the same one or more terms in the search logdata: determining an origin location for each occurrence of the query,the origin location being a location from which the occurrence of thequery is determined to have originated; determining a content locationfor each occurrence of the query, the content location being a locationspecified by content related to the occurrence of the query, the contentlocation being independent of the origin location; for each of aplurality of catchment areas, determining catchment area matches for thequery based on the origin location of each occurrence of the query andthe content location of the occurrence of the query; determining, foreach catchment area, a catchment area score that is indicative of aninterest level for the catchment area for a query, the determinationbased on a number of catchment area matches for the catchment area forthe query; and selecting, for the query and based on the catchment areascores for the catchment areas, one of the catchment areas as a selectedcatchment area for the query. Other embodiments of this aspect includecorresponding systems, apparatus, and computer programs, configured toperform the actions of the methods, encoded on computer storage devices.

Particular embodiments of the subject matter described in thisspecification can be implemented so as to realize one or more of thefollowing advantages. Search query processing can be performed moreefficiently by selecting search results using query catchment areas. Thecatchment area for a query can be applied across multiple differentcatchment areas of the same type (e.g., cities or states for citycatchment areas or state catchment areas), and even for particularcatchment areas from which a particular query has been received few, ifany, times prior. The catchment area for the queries are determined fromuser behavior, which results in a natural emergence of catchment areas,and such catchment areas may be more accurate the manually selectedcatchment areas.

The details of one or more embodiments of the subject matter describedin this specification are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an example environment in which a searchsystem provides search services.

FIG. 2 is a flow diagram of an example process for determining catchmentareas for queries.

FIG. 3 is a diagram of catchment areas and locations based on searchresult selections for queries.

FIG. 4 is a flow diagram of an example process for determining catchmentarea matches for a query based on search result selections for thequery.

FIG. 5 is a diagram of catchment areas and locations based on queriesthat include location terms.

FIG. 6 is a flow diagram of an example process for determining catchmentarea matches for a query based on frequencies of the query.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

Overview

The system of this disclosure determines catchment areas for queriesretrieved from search log data. Each query includes one or more terms,and each of the queries has one or more occurrences of the same one ormore terms in the search log data. For example, if the query [foo]occurs 100 times in the search log data, there are 100 occurrences ofthe query.

For each occurrence of the query, the system determines an originlocation and a content location for the query. The origin location is alocation from which the occurrence of the query is determined to haveoriginated. The content location is a location specified by contentrelated to the occurrence of the query. For each of a set of catchmentareas, the system determines catchment area matches for the query basedon the origin location of each occurrence of the query and the contentlocation of the occurrence of the query. Then, for each catchment area,the system determines a catchment area score that is indicative of aninterest level for the catchment area for a query. The determination isbased on a number of catchment area matches for the catchment area forthe query. Based on the catchment area scores for the catchment areas,the system selects one of the catchment areas as a selected catchmentarea for the query.

Any appropriate type of content location can be used for a query. Onetype of content location is a document location. A document location isa location of a document referenced by a search result selected for thequery. Another type of content location is a location term that isincluded in the query in addition to the one or more terms of the query,e.g., [foo<Location>].

Likewise, any appropriate type of catchment area analysis to determinecatchment area matches can be used. For example, for document locations,a click log analysis can be used to determine catchment area matches,and for location terms, a query frequency analysis can be used todetermine catchment area matches.

For the click log analysis, a catchment area match occurs when theorigin location for an occurrence of the query and the document locationfor the occurrence of the query are located within the same catchmentarea. For example, for a query [foo] having an origin location inMountain View and a document location in Mountain View, a catchment areamatch would occur for the catchment areas of city, metro and state.Conversely, for a query [foo] having an origin location in Mountain Viewand a document location in Sacramento, a catchment area match wouldoccur only for the catchment area of state.

For the frequency log analysis, examples location terms include citynames, state names, etc. A catchment area type is determined for thelocation term of the occurrence of the query. A catchment area match fora catchment area is counted only when an occurrence of the query has alocation term that specifies the catchment area of the catchment areatype in which the origin location for the occurrence of the query islocated. For example, for the query [foo Mountain View] that originatedfrom the city of Mountain View, a catchment area match is determinedonly for the catchment area of city. Likewise, for the catchment area of[foo California] that originated from any location in the state ofCalifornia, a catchment area match is determined only for the catchmentarea of state.

Catchment area scores are then determined for the catchment areas basedon the catchment area matches, and a catchment area for the query isselected based on the catchment area scores. The selection of acatchment area can be further dependent on the catchment area meeting adiversity threshold, which corresponds to a threshold number ofcatchment areas of a same type that cover different geographic areas andhaving constituent catchment area scores that meets a constituentcatchment area score threshold. This ensures that a particular query[foo] for which a catchment area is selected is applicable to allcatchment areas of the same type (e.g., multiple cities), and not justone particular instance of the catchment area (e.g., a particular city).Other data filtering and normalization techniques can also be used onthe catchment area scores to select a catchment area.

These features and other features are described in more detail below.

Example Environment

FIG. 1 is a block diagram of an example environment 100 in which asearch system 110 provides search services. The example environment 100includes a network 102, e.g., the Internet, connects publishers 104,user devices 106, and the search system 110. The environment 100 mayinclude many thousands publishers and user devices 106.

A web site 104 is one or more resources 105 associated with a domainname and hosted by one or more servers. An example web site is acollection of web pages formatted in hypertext markup language (HTML)that can contain text, images, multimedia content, and programmingelements, e.g., scripts. Each web site 104 is maintained by a publisher,e.g., an entity that manages and/or owns the web site.

A resource 105 is any data that can be provided by the web site 104 overthe network 102 and that is associated with a resource address.Resources 105 include HTML pages, word processing documents, andportable document format (PDF) documents, images, video, and feedsources, to name just a few. The resources can include content, e.g.,words, phrases, images and audio and may include embedded information(e.g., meta information and hyperlinks) and/or embedded instructions(e.g., scripts).

A user device 106 is an electronic device that is under control of auser and is capable of requesting and receiving resources over thenetwork 102. Example user devices 106 include personal computers, mobilecommunication devices, and other devices that can send and receive dataover the network 102. A user device 106 typically includes a userapplication, e.g., a web browser, to facilitate the sending andreceiving of data over the network 102.

To facilitate searching of resources 105, the search system 110identifies the resources 105 by crawling and indexing the resources 105provided by the publishers 104. Data about the resources 105 can beindexed in a search index 112. The resources can also be indexedaccording to a document location (e.g., a geographic location) for theresource, as indicated by the data structure portion 113. In the datastructure portion 113, each resource R has corresponding documentlocation data DLD describing a document location for the resource R. Thedocument location is a location to which the subject matter of theresource pertains, and is independent of the actual location at whichthe resource is hosted. For example, a document location may be abusiness location for the resource for a business for which the resourceis provided. A document location may also be a location of a governmententity, e.g., documents related to the state laws of California may havea document location of Sacramento. Other types of document locations mayalso be used (e.g., a location of a state park for a web page describingthe state park, etc.).

The document locations are part of the search index 112 and can bedetermined in a variety of appropriate ways. For example, the documentlocation for a resource can be determined based on contents of theresource. To illustrate, assume a business address is specified at a“Contact Us” web page for a business for which the resource is provided.Alternatively, the document location for the resource can also bedetermined based on a map data that specify a geographic location ofsubject matter of the resource. The document location data DLD can thusspecify an address or geographic coordinates, or a larger area, such asa city or a state.

The user devices 106 submit search queries 108 to the search system 110.In response, the search system 110 accesses the search index 112 toidentify resources 105 that are determined to be relevant to the searchquery 108 (i.e. candidate resources), for example based on relevancescores computed for the resources 105. The search system 110 selectsresources 105, generates search results 109 that identify the resources105, and returns the search results 109 to the user devices 106. Asearch result 109 is data generated by the search system 110 thatreferences a resource 105 that is responsive to a particular searchquery, and includes an active link (e.g., a URL) to the resource. Anexample search result 109 can include a web page title, a snippet oftext or a portion of an image extracted from the web page, and the URLof the web page.

A variety of appropriate scoring and ranking algorithms can be used bythe search system 110 to score resources in response to a query. Forexample, a result score for a resource 105 can be computed based on aninformation retrieval (“IR”) score corresponding to the resource 105,and, optionally, a quality score of the resource 105 relative to otheravailable resources. A presentation order for the search results 109 canbe selected based on the result scores. In turn, data that causespresentation of the search results 109 according to the presentationorder can be provided to the user device 106.

In some implementations, the search system 110 accesses query catchmentdata 122 for a received query to determine a catchment area for a query.The data structure 123 illustrates that for a number n of queries Q,corresponding catchment areas CA have been determined for each query.The catchment system 120 determines the catchment areas, and theoperation of the catchment system 120 is described in more detail below.

In some implementations, when a query is determined to have a catchmentarea, the query location, catchment area of the query, and the documentlocations can be used to adjust result scores. For example, for a querywith a catchment area of “city” that is issued from a particular city,resources with document locations within the catchment area of theparticular city may receive a scoring or ranking boost in relevance.Such a scoring adjustment may be, for example, a proximity boost thatadjusts a score based on a proximity of a document location in thecatchment area of the query to the query location, or a fixed scoringadjustment that is applied to any resource within document location inthe catchment area of the query. Other appropriate scoring adjustmentscan also be used.

User devices 106 receive the search results 109 and render the searchresults 109 for presentation to users. In response to the user selecting(e.g., clicking) a link (e.g., URL) in a search result at a user device106, the user device 106 requests the resource 105 referenced by thelink. The web site 104 hosting the resource 105 receives the request forthe resource 105 from the user device 106 and provides the resource 105to the requesting user device 106.

Search queries 108 submitted during user sessions and result data (i.e.,data specifying search results that were provided in response to thesearch queries and/or search results that were selected) are stored in adata store such as the search log data store 114. Interaction dataspecifying user actions taken in response to presentation of searchresults 109 are also stored in the search log data store 114. Theinteraction data can specify whether a particular search result wasselected (e.g., clicked) by a user, and can also specify the resourcethat was referenced by the particular search result. In someimplementations, location data specifying a query location QL for thesearch query that was submitted by the user can also be stored in thesearch log data store 114 and associated with (i.e., indexed accordingto or stored at a memory location assigned to) the resources referencedby the search result that the user selected. A query location QL can bedetermined, for example, by resolving an IP address to a location; bylocation data provided with the query; or by any other appropriatelocation process.

The data stored in the search log data store 114 can be used to mapsearch queries 108 submitted during search sessions to resources 105that were identified in search results 109, actions taken by users, andquery locations for the search queries. As illustrated in the datastructure portion 119, each query Q is associated with its correspondingquery location data QLD specifying the location from which the queryoriginated, and search result data SR specifying a search result (orsearch results) that were presented in response to the query andselected by a user.

Determining Query Catchment Areas for Queries

The catchment system 120 determines catchment areas for queries byprocessing the search log data 118. In some implementations, a catchmentarea for a query is one of multiple types, such as one of a citycatchment area type, a metro catchment area type, and a state catchmentarea type. The catchment system 120 processes the query logs for queriesfrom multiple different locations and different respective catchmentareas to determine a catchment area type for each query. The catchmentarea type is then applied to any matching query received from a user.

FIG. 2 is a flow diagram of an example process 200 for determiningcatchment areas for queries. The process 200 is implemented in thecatchment system 120, which is realized by a data processing apparatusof one or more computers. The process 200 accesses the query data storedin the search log data 114. As described above, the search log data 114stores data for each query submitted to the search system 110. As thesame query of one or more terms may be submitted by multiple users frommany different locations, there are multiple occurrences of the samequery in the search log data. The process 200 operates on each query,processing each occurrence of the query that is selected.

The process 200 determines an origin location for each occurrence of thequery Q_(n) (202). For example, the process 200 accesses the querylocation data QLD in the search log data 114 that describes a locationfrom which the occurrence of the query is determined to have originated.The location may be an address, geographic coordinates, or a city name,for example.

The process 200 determines a content location for each occurrence of thequery Qn (204). The content location is specified by content related tothe occurrence of the query, and is determined independent originlocation of the query, i.e., the origin location data of the query doesnot define the content location of the query. However, the contentlocation may be the same as the origin location (e.g., both the contentlocation and the origin location may be, for example, a particularcity). The processing of two example content locations—documentlocations and location terms—are described below. Using a documentlocation as a content location is described with respect to FIGS. 3 and4, and using a location term in a query as a content location isdescribed with respect to FIGS. 5 and 6.

For each of a plurality of catchment areas, the process 200 determinescatchment area matches for the query based on the origin location ofeach occurrence of the query and the content location of the occurrenceof the query (206). A catchment area match indicates that a catchmentarea is of particular interest for a query. Catchment area matchingbased on document locations is described with respect to FIG. 4, andcatchment area matching based on location terms is described withrespect to FIG. 6.

The process 200 determines, for each catchment area, a catchment areascore that is indicative of an interest level for the catchment area fora query (208). The determination is based on a number of catchment areamatches for the catchment area for the query. In some implementations, acatchment area count <C> of catchment area matches for the query isdetermined for each catchment area. Occurrences of the query may spanmultiple different query locations from different particular catchmentareas. For example, the query [foo] may be received from multipledifferent cities and states in the United States. Accordingly, theprocess 200 generates constituent catchment area scores <c> forcatchment areas of the same type and that cover a plurality of differentgeographic areas. Table 1 below illustrates an example for constituentcatchment area scores for queries across multiple catchment areas:

TABLE 1 Q1 Q2 . . . Qn CAC-1 <c> <c> . . . <c> CAC-2 <c> <c> . . . <c> .. . . . . . . . . . . . . . CAC-x <c> <c> . . . <c> CAM-1 <c> <c> . . .<c> CAM-2 <c> <c> . . . <c> . . . . . . . . . . . . . . . CAM-y <c> <c>. . . <c> CAS-1 <c> <c> . . . <c> CAS-2 <c> <c> . . . <c> . . . . . . .. . . . . . . . CAS-z <c> <c> . . . <c>

Three catchment area types are shown—city (CAC), metro (CAM) and state(CAS). CAC-1-CAC-x correspond to catchment areas for city 1-city x, andso on. For each query Q1-Qn, constituent catchment area scores <c> aredetermined for each catchment area. The catchment area score for eachcatchment area type is based on the constituent catchment area scores.For example, the catchment area score for the catchment area of “city”for the query Q1 may be the sum of scores <c> for catchment areasCAC-1-CAC-x in the first column. Likewise, the scores for the metrocatchment areas and the state catchment area may be respectively summedto determine the catchment area scores for the metro catchment area andstate catchment area, and so on.

In some implementations, constituent catchment area scores <c> arecapped to preclude an otherwise large particular catchment area score<c> alone resulting in the selection of a catchment area for a query.For example, a particular query Q may describe a particular subject thatis of particular interest for users in a particular city with a largepopulation (e.g., Los Angeles, Calif.). The number of occurrences of thequery Q from the city of Los Angeles, and the number of resultingcatchment area matches for the catchment area of “city” may be so large(e.g., 52,000) that the catchment system 120 would select the catchmentarea of “city” for the query Q. However, the particular subject may beof little interest to users that are not within the Los Angeles area.Thus, selecting the catchment area of “city” for the query Q will notresult in more relevant results for users in other cities (e.g., NewYork, San Francisco, Miami, etc.) that issue the query Q. Accordingly,the constituent catchment area score for the city catchment area may becapped to a constituent scoring cap (e.g., 5,000). The value of the capmay be selected such that a catchment area cannot be selected for aquery unless the cap value is combined with constituent catchment areascores of other catchment areas of the same type. The cap value can be afixed raw count value as shown, a percentage of occurrences of thequery, or some other value that ensures that any one catchment areacannot be selected for a query unless the cap value is combined withconstituent catchment area scores of other catchment areas of the sametype for the query. Furthermore, different constituent scoring caps canbe used for each respective catchment area type. For example, thecatchment area of “city” may have a constituent scoring cap of 5,000;the catchment area of “metro” may have a constituent scoring cap of15,000; and so on.

In variations of this implementation, each constituent catchment areascore may be required to meet a constituent catchment area scorethreshold before the constituent score can be counted. A constituentcatchment area score threshold can be used, for example, to ensure thatanomalous or statistically insignificant results for a particularcatchment area are ignored. The constituent catchment area scorethreshold can be a fixed raw count value, a percentage of occurrences ofthe query, or some other value that ensures that catchment score isstatistically significant.

The process 200 selects one of the catchment areas as a selectedcatchment area for the query based on the catchment area scores for thecatchment areas (210). For example, the catchment area with the highestcatchment area score of the catchment areas is selected as a selectedcatchment area for the query.

In some implementations, a catchment area score must meet a catchmentarea score threshold before the catchment area can be selected for aquery. The score threshold may be, for example, a fixed raw count value,a percentage of occurrences of the query, or some other value thatensures that catchment score is statistically significant. By way ofanother example, the catchment area score may be a ratio of thecatchment area match value to a total count of occurrences of the query,e.g.,X _(Cn) =C _(n) /#Q _(n)where

-   -   C_(n) is the catchment area count for a catchment area CA for        query Q_(n);    -   #Q_(n) is the number of occurrences of the query Q_(n); and    -   X_(Cn) is the catchment area score for the catchment area CA.

Provided X_(Cn) is the largest of the catchment area scores for thequery Q_(n), and exceeds a catchment area score threshold, itcorresponding catchment area CA is selected as the catchment area forthe query Q_(n).

In some implementations, the selection of a catchment area is dependenton the catchment area meeting a diversity threshold, which correspondsto a threshold number of catchment areas of a same type that coverdifferent geographic areas. This ensures that a particular query [foo]for which a catchment area is selected is applicable to all catchmentareas of the same type (e.g., multiple cities), and not just oneparticular instance of the catchment area (e.g., a particular city). Inparticular, the catchment area diversity threshold specifies a thresholdnumber of catchment areas of a same type that cover different geographicareas and that have constituent catchment area scores that meet aconstituent catchment area score threshold. The constituent catchmentarea score threshold can be a fixed raw count value, a percentage ofoccurrences of the query, or some other value. The diversity thresholdvalue can vary depending on the catchment area. In some implementations,the diversity threshold value is proportional to the number of catchmentareas of the particular type. For example, the city catchment areacorresponds to cities, while the state catchment area corresponds tostates. Thus, the diversity threshold value for the city catchment areais larger than the diversity threshold value for the state catchmentarea.

As described above, document locations and location terms can be used ascontent locations for a query. The following sections describe theprocessing of document locations and location terms.

Content Location Based on Document Locations

FIG. 3 is a diagram 300 of catchment area and locations based on searchresult selections for queries. Three catchment areas are show—CA1, CA2,and CA3. For example, CA1 may be a city catchment area CA1, CA2 may be ametro catchment area, and CA3 may be a state catchment area. Only threecatchment areas are shown so as to avoid drawing congestion. Multiplecity catchment areas may overlap with a metro catchment area, andmultiple metro catchment areas may overlap with a state catchment area.Additionally, other catchment area types may also be processed.

Pairs of origin locations OL and document locations DL are shown forthree different queries Q1, Q2 and Q3: {OL1, DL1}, {OL2, DL2}, and {OL3,DL3}. Each pair corresponds to a document location DL of a resourcereferenced by a search result that is selected by a user in response tothe occurrence of a query with the respective query location QL. In thediagram 300, each origin location OL has one corresponding documentlocation DL, e.g., {OL1, DL1}, {OL2, DL2}, and {OL3, DL3}. However, ifmore than one search result is selected for a query, then an originlocation may have more than one corresponding document location. In thecase of the latter, the origin location is pairwise processed for eachdocument location to determine a catchment area match.

The process of determining a catchment area match for origin locationsand document locations is described with reference to FIG. 4. Theprocess 400 is implemented in the catchment system 120, which isrealized by a data processing apparatus of one or more computers.

The process 400 selects a document location of a resource referenced bya search result that is selected by a user in response to the occurrenceof a query (402). For example, the catchment system 120 accesses thesearch index 112 to determine the document location DL for a particularresource.

The process determines a catchment area match only for each catchmentarea in which the origin location for an occurrence of the query and thecontent location for the occurrence of the query are located (404). Forexample, assume CA1 corresponds to the city catchment area for the cityof San Francisco; CA2 corresponds to the metro catchment area of “BayArea” which encompasses San Francisco and surrounding suburbs, and thatCA3 corresponds to the state catchment area for California.

With respect to the location pair {OL1, DL1} for the query Q1, bothlocations occur in the catchment area of San Francisco. Accordingly thecatchment area “city” receives a catchment area match for the occurrenceof the query Q1. Additionally, both locations occur in the catchmentarea of “Bay Area,” and thus the catchment area “metro” receives acatchment area match for the occurrence of the query Q1. Finally, theboth locations occur in the catchment area of “state,” and thus thecatchment area “state” receives a catchment area match for theoccurrence of the query Q1.

With respect to the location pair {OL2, DL2} for the query Q2, theorigin location is San Francisco, and the document location is withinthe metro catchment area, e.g., the city of Fremont, Calif. Accordinglythe catchment area “city” does not receive a catchment area match forthe occurrence of the query Q2. Conversely, both locations occur in thecatchment area of “Bay Area,” and thus the catchment area “metro”receives a catchment area match for the occurrence of the query Q2, andboth locations occur in the catchment area of “state,” and thus thecatchment area “state” receives a catchment area match for theoccurrence of the query.

With respect to the location pair {OL3, DL3} for the query Q3, theorigin location is San Francisco, and the documents location is withinthe state catchment area, e.g., the city of Los Angeles, Calif.Accordingly the catchment areas of “city” and “state” do not receive acatchment area match for the occurrence of the query Q3. However, thecatchment area of “state” does receive a match for the query Q3, as bothlocations occur in the catchment area of “state.”

Assuming various thresholds and diversity requirements are ignored, thefollowing catchment areas would be respectively selected for the queriesQ1, Q2 and Q3: CA1, CA2, and CA3. This is because an origin location anddocument location pair will create catchment area matches for eachcatchment area in which both locations are located. Thus, when aparticular occurrence of a query generates a catchment area match forcity, metro and state catchment areas, the actual catchment area that ismost relevant to the query is the city catchment area. In other words,when catchment area matches are determined for a root catchment area anddescendent catchment areas (e.g., State→Metro→City), the most dependentcatchment area in the catchment hierarchy is the actual catchment areathat is most relevant to the query is the city catchment area.

A catchment area selection scheme that takes into account the hierarchalscoring determines a respective catchment area score threshold for thecity catchment area type, metro catchment area type, and state catchmentarea type. The score threshold for the city type is less than the scorethreshold for the metro type, and the score threshold for the metro typeis less than the score threshold for the state type. For a particularquery, a city catchment area type is selected if the catchment areascore for the city catchment area type meets its respective thresholdand the catchment area scores for the metro catchment area type and thestate catchment area type do not meet their respective thresholds.Likewise, the metro catchment area type is selected for the query if thecatchment area score for the metro catchment area type meets itsrespective threshold and the catchment area score for the statecatchment area type does not meet its respective threshold. Finally, thestate catchment area type is selected for the query if the catchmentarea score for the state catchment area type meets its respectivethreshold.

In another implementation, when catchment area matches are determinedfor a root catchment area and descendent catchment areas (e.g.,State→Metro→City), only the most dependent catchment area in thecatchment hierarchy receives a catchment area match. For example, forthe query Q1 with the location pair {OL1, DL1}, only the city catchmentarea CA1 will receive a catchment area match. In this implementation,the catchment area with the highest resulting score is selected for thequery.

Additional processing steps can also be implemented to determinecatchment areas from the document locations. For example, catchment areacaps, constituent catchment area scoring thresholds, and diversitythresholds can be used to ensure that a catchment area is not selectedfor query unless the query appears to be relevant to multiple differentcatchment areas of the same type, e.g., multiple different cities,multiple different states, etc.

Query Location Based on Document Locations

FIG. 5 is a diagram 500 of catchment areas and locations based onqueries that include location terms. Pairs of origin locations OL anddocument locations DL are shown for four different queries Q1, Q2, Q3and Q4: {OL1, LT1}, {OL2, LT2}, {OL3, LT3}, and {QL4, LT4}. Each paircorresponds to location term LT included in an occurrence of a querywith the respective query location QL. Assume queries Q1, Q2 and Q3query each have an origin location of San Francisco, and assume query Q4has an origin location of Los Angeles. Each query is of the form [<queryterms><location term>]. For example, the query Q1 may be [foo SanFrancisco], the query Q2 may be [boo Bay Area], the query Q3 may be [gooCalifornia], and the query Q4 may be [moo San Francisco]. The queriesand terms are summarized in table 2 below.

TABLE 2 Query Origin Location Location Term foo San Francisco SanFrancisco San Francisco boo Bay Area San Francisco Bay Area gooCalifornia San Francisco California moo San Francisco Los Angeles SanFrancisco

FIG. 6 is a flow diagram of an example process 600 for determiningcatchment area matches for a query based on frequencies of the query.The process 600 is implemented in the catchment system 120, which isrealized by a data processing apparatus of one or more computers.

The process 600 determines a location term for a query (602). Forexample, for the query Q1-Q4, the respective location terms in the thirdcolumn of table 2 are determined. The terms can be determined based onterm look-up tables, term matching, or other term and/or languageprocessing techniques.

The process 600 determines a catchment area type for the location term(604). For example, the term “San Francisco” matches a “city” type; theterm “Bay Area” matches a “metro” type, and the term “California”matches a “state” type. The catchment area types can be determined byreferencing a look-up table that references location terms to catchmentarea types, or some other appropriate mapping process.

The process 600 determines a catchment area match only for an occurrenceof the query having a location term that specifies the catchment area ofthe catchment area type in which the origin location for the occurrenceof the query is located. The corresponding catchment area types andmatches are shown in table 3 below.

TABLE 3 Query Origin Location Location Term Area Type Match foo SanFrancisco San Francisco San Francisco City City boo Bay Area SanFrancisco Bay Area Metro Metro goo California San Francisco CaliforniaState State moo San Francisco Los Angeles San Francisco City —

For query Q1, the catchment area type is “city,” and the location termspecifies the catchment area for the city of San Francisco. The originlocation is San Francisco, and is within the city catchment area for SanFrancisco. Thus, a catchment area match occurs for the catchment areatype of “city” for the query Q1.

For query Q2, the catchment area type is “metro,” and the location termspecifies the catchment area for the metro Bay Area. The origin locationis San Francisco, and is within the metro catchment area for the metroBay Area. Thus, a catchment area match occurs for the catchment areatype of “metro” for the query Q2.

For query Q3, the catchment area type is “state,” and the location termspecifies the catchment area for the state of California. The originlocation is San Francisco, which is in the state of California. Thus, acatchment area match occurs for the catchment area type of “state” forthe query Q3.

For query Q4, the catchment area type is “city,” and the location termspecifies the catchment area for the city of San Francisco. The originlocation, however, is Los Angeles, and Los Angeles is not within thecity catchment area of the city of San Francisco. Thus, a catchment areamatch is not generated from that occurrence of the query Q4.

The process 500 processes queries, generating respective catchment areamatches for each query. For each query, a catchment area is thenselected for the query and based on the catchment area scores for thecatchment areas for the query. The catchment area, for example, with thehighest catchment area score may be selected for the query.

For example, assume that the catchment area scores for catchment areasare the respective number of matches for a query that occur from alloccurrences of the query. Also assume that the catchment system 120determines the following matches the query of the form [foo <location>]after processing the search log data 114: city: 11,400; metro: 987;state: 323. In this situation, the query “foo” would be associated withthe catchment area of “city.”

Additional processing steps can also be implemented to determinecatchment areas from the frequency of location terms. For example,catchment area caps, constituent catchment area scoring thresholds, anddiversity thresholds can be used to ensure that a catchment area is notselected for query unless the query appears to be relevant to multipledifferent catchment areas of the same type, e.g., multiple differentcities, multiple different states, etc.

Additional Implementation Details

Although the examples above are described in the context of city, metroand state catchment areas, other catchment areas can also be used. Forexample, sub-city catchment areas, neighborhood catchment areas, or evencatchment areas that are emergent from data mining techniques can beused.

Embodiments of the subject matter and the operations described in thisspecification can be implemented in digital electronic circuitry, or incomputer software, firmware, or hardware, including the structuresdisclosed in this specification and their structural equivalents, or incombinations of one or more of them. Embodiments of the subject matterdescribed in this specification can be implemented as one or morecomputer programs, i.e., one or more modules of computer programinstructions, encoded on computer storage medium for execution by, or tocontrol the operation of, data processing apparatus. Alternatively or inaddition, the program instructions can be encoded on anartificially-generated propagated signal, e.g., a machine-generatedelectrical, optical, or electromagnetic signal, that is generated toencode information for transmission to suitable receiver apparatus forexecution by a data processing apparatus. A computer storage medium canbe, or be included in, a computer-readable storage device, acomputer-readable storage substrate, a random or serial access memoryarray or device, or a combination of one or more of them. Moreover,while a computer storage medium is not a propagated signal, a computerstorage medium can be a source or destination of computer programinstructions encoded in an artificially-generated propagated signal. Thecomputer storage medium can also be, or be included in, one or moreseparate physical components or media (e.g., multiple CDs, disks, orother storage devices).

The operations described in this specification can be implemented asoperations performed by a data processing apparatus on data stored onone or more computer-readable storage devices or received from othersources.

The term “data processing apparatus” encompasses all kinds of apparatus,devices, and machines for processing data, including by way of example aprogrammable processor, a computer, a system on a chip, or multipleones, or combinations, of the foregoing The apparatus can includespecial purpose logic circuitry, e.g., an FPGA (field programmable gatearray) or an ASIC (application-specific integrated circuit). Theapparatus can also include, in addition to hardware, code that createsan execution environment for the computer program in question, e.g.,code that constitutes processor firmware, a protocol stack, a databasemanagement system, an operating system, a cross-platform runtimeenvironment, a virtual machine, or a combination of one or more of them.The apparatus and execution environment can realize various differentcomputing model infrastructures, such as web services, distributedcomputing and grid computing infrastructures.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, declarative orprocedural languages, and it can be deployed in any form, including as astand-alone program or as a module, component, subroutine, object, orother unit suitable for use in a computing environment. A computerprogram may, but need not, correspond to a file in a file system. Aprogram can be stored in a portion of a file that holds other programsor data (e.g., one or more scripts stored in a markup languagedocument), in a single file dedicated to the program in question, or inmultiple coordinated files (e.g., files that store one or more modules,sub-programs, or portions of code). A computer program can be deployedto be executed on one computer or on multiple computers that are locatedat one site or distributed across multiple sites and interconnected by acommunication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform actions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application-specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read-only memory ora random access memory or both. The essential elements of a computer area processor for performing actions in accordance with instructions andone or more memory devices for storing instructions and data. Generally,a computer will also include, or be operatively coupled to receive datafrom or transfer data to, or both, one or more mass storage devices forstoring data, e.g., magnetic, magneto-optical disks, or optical disks.However, a computer need not have such devices. Moreover, a computer canbe embedded in another device, e.g., a mobile telephone, a personaldigital assistant (PDA), a mobile audio or video player, a game console,a Global Positioning System (GPS) receiver, or a portable storage device(e.g., a universal serial bus (USB) flash drive), to name just a few.Devices suitable for storing computer program instructions and datainclude all forms of non-volatile memory, media and memory devices,including by way of example semiconductor memory devices, e.g., EPROM,EEPROM, and flash memory devices; magnetic disks, e.g., internal harddisks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROMdisks. The processor and the memory can be supplemented by, orincorporated in, special purpose logic circuitry.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube) or LCD (liquidcrystal display) monitor, for displaying information to the user and akeyboard and a pointing device, e.g., a mouse or a trackball, by whichthe user can provide input to the computer. Other kinds of devices canbe used to provide for interaction with a user as well; for example,feedback provided to the user can be any form of sensory feedback, e.g.,visual feedback, auditory feedback, or tactile feedback; and input fromthe user can be received in any form, including acoustic, speech, ortactile input. In addition, a computer can interact with a user bysending documents to and receiving documents from a device that is usedby the user; for example, by sending web pages to a web browser on auser's client device in response to requests received from the webbrowser.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back-end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front-end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described in this specification, or any combination of one ormore such back-end, middleware, or front-end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), an inter-network (e.g., the Internet), andpeer-to-peer networks (e.g., ad hoc peer-to-peer networks).

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other. In someembodiments, a server transmits data (e.g., an HTML page) to a clientdevice (e.g., for purposes of displaying data to and receiving userinput from a user interacting with the client device). Data generated atthe client device (e.g., a result of the user interaction) can bereceived from the client device at the server.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinventions or of what may be claimed, but rather as descriptions offeatures specific to particular embodiments of particular inventions.Certain features that are described in this specification in the contextof separate embodiments can also be implemented in combination in asingle embodiment. Conversely, various features that are described inthe context of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the embodiments described above should not be understoodas requiring such separation in all embodiments, and it should beunderstood that the described program components and systems cangenerally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular embodiments of the subject matter have been described.Other embodiments are within the scope of the following claims. In somecases, the actions recited in the claims can be performed in a differentorder and still achieve desirable results. In addition, the processesdepicted in the accompanying figures do not necessarily require theparticular order shown, or sequential order, to achieve desirableresults. In certain implementations, multitasking and parallelprocessing may be advantageous.

What is claimed is:
 1. A method performed by data processing apparatus,the method comprising: for each of a plurality of queries stored insearch log data, each of the queries comprising one or more terms, andeach of the queries having one or more occurrences of the same one ormore terms in the search log data: determining, for each of a pluralityof catchment areas, catchment area matches for the query based on anorigin location of each occurrence of a query and a content location ofeach occurrence of the query, wherein a first catchment area is a subsetarea of a second catchment area, and the second catchment area is asubset of a third catchment area; determining, for each of a pluralityof catchment areas, wherein the each catchment area belongs one of aplurality of catchment area types, a catchment area score that isindicative of an interest level for the catchment area for a query, thedetermination based on a number of catchment area matches for thecatchment area for the query; determining a respective catchment areascore threshold for the first catchment area type, second catchment areatype, and the third catchment area type; selecting a catchment area fora query, the selecting comprising: selecting the first catchment areatype if the catchment area score for the first catchment area type meetsits respective threshold and the catchment area scores for the secondcatchment area type and the third catchment area type do not meet theirrespective thresholds; selecting the second catchment area type if thecatchment area score for the second catchment area type meets itsrespective threshold and the catchment area score for the thirdcatchment area type does not meet its respective threshold; or selectingthe third catchment area type if the catchment area score for the thirdcatchment area type meets its respective threshold.
 2. The method ofclaim 1, wherein the content location for each occurrence of the queryis based on a document location of a resource referenced by a searchresult that is selected by a user in response to the occurrence of thequery.
 3. The method of claim 2, wherein determining catchment areamatches for the query for each catchment area comprises determining acatchment area match only for each catchment area in which the originlocation for an occurrence of the query and the content location for theoccurrence of the query are located.
 4. The method of claim 2, whereindetermining the catchment area match comprises determining a catchmentarea match only for an occurrence of the query having a location termthat specifies the catchment area of the catchment area type in whichthe origin location for the occurrence of the query is located.
 5. Themethod of claim 1, wherein determining the catchment area matches foreach catchment are comprises capping a number of matches for eachcatchment area in proportion to a geographic size of the catchment areatype.
 6. The method of claim 5, wherein determining the catchment areascore for each catchment area comprises determining the catchment areascore based on constituent catchment area scores determined forcatchment areas of the same type and that cover a plurality of differentgeographic areas.
 7. A system comprising: a data processing apparatus;and a computer storage medium encoded with a computer program, theprogram comprising instructions that when executed by the dataprocessing apparatus cause the data processing apparatus to performoperations comprising: for each of a plurality of queries stored insearch log data, each of the queries comprising one or more terms, andeach of the queries having one or more occurrences of the same one ormore terms in the search log data: determining, for each of a pluralityof catchment areas, catchment area matches for the query based on anorigin location of each occurrence of a query and a content location ofeach occurrence of the query, wherein a first catchment area is a subsetarea of a second catchment area, and the second catchment area is asubset of a third catchment area; determining, for each of a pluralityof catchment areas, wherein the each catchment area belongs one of aplurality of catchment area types, a catchment area score that isindicative of an interest level for the catchment area for a query, thedetermination based on a number of catchment area matches for thecatchment area for the query; determining a respective catchment areascore threshold for the first catchment area type, second catchment areatype, and the third catchment area type; selecting a catchment area fora query, the selecting comprising: selecting the first catchment areatype if the catchment area score for the first catchment area type meetsits respective threshold and the catchment area scores for the secondcatchment area type and the third catchment area type do not meet theirrespective thresholds; selecting the second catchment area type if thecatchment area score for the second catchment area type meets itsrespective threshold and the catchment area score for the thirdcatchment area type does not meet its respective threshold; or selectingthe third catchment area type if the catchment area score for the thirdcatchment area type meets its respective threshold.
 8. The system ofclaim 7, wherein the content location for each occurrence of the queryis based on a document location of a resource referenced by a searchresult that is selected by a user in response to the occurrence of thequery.
 9. The system of claim 8, wherein determining catchment areamatches for the query for each catchment area comprises determining acatchment area match only for each catchment area in which the originlocation for an occurrence of the query and the content location for theoccurrence of the query are located.
 10. The system of claim 9, whereindetermining the catchment area match comprises determining a catchmentarea match only for an occurrence of the query having a location termthat specifies the catchment area of the catchment area type in whichthe origin location for the occurrence of the query is located.
 11. Thesystem of claim 8, wherein determining the catchment area matches foreach catchment are comprises capping a number of matches for eachcatchment area in proportion to a geographic size of the catchment areatype.
 12. The system of claim 11, wherein determining the catchment areascore for each catchment area comprises determining the catchment areascore based on constituent catchment area scores determined forcatchment areas of the same type and that cover a plurality of differentgeographic areas.
 13. A non-transitory computer storage medium encodedwith a computer program, the program comprising instructions that whenexecuted by a data processing apparatus cause the data processingapparatus to perform operations comprising: for each of a plurality ofqueries stored in search log data, each of the queries comprising one ormore terms, and each of the queries having one or more occurrences ofthe same one or more terms in the search log data: determining, for eachof a plurality of catchment areas, catchment area matches for the querybased on an origin location of each occurrence of a query and a contentlocation of each occurrence of the query, wherein a first catchment areais a subset area of a second catchment area, and the second catchmentarea is a subset of a third catchment area; determining, for each of aplurality of catchment areas, wherein the each catchment area belongsone of a plurality of catchment area types, a catchment area score thatis indicative of an interest level for the catchment area for a query,the determination based on a number of catchment area matches for thecatchment area for the query; determining a respective catchment areascore threshold for the first catchment area type, second catchment areatype, and the third catchment area type; selecting a catchment area fora query, the selecting comprising: selecting the first catchment areatype if the catchment area score for the first catchment area type meetsits respective threshold and the catchment area scores for the secondcatchment area type and the third catchment area type do not meet theirrespective thresholds; selecting the second catchment area type if thecatchment area score for the second catchment area type meets itsrespective threshold and the catchment area score for the thirdcatchment area type does not meet its respective threshold; or selectingthe third catchment area type if the catchment area score for the thirdcatchment area type meets its respective threshold.